Optimal. Leaf size=869 \[ \frac {2 B^2 (b c-a d)^3 g^3 x}{3 b^3 d^3}+\frac {B^2 (b c-a d)^2 g^2 (4 b d f-3 b c g-a d g) x}{b^3 d^3}+\frac {B^2 (b c-a d)^2 g^3 (c+d x)^2}{3 b^2 d^4}-\frac {B (b c-a d) g \left (a^2 d^2 g^2-2 a b d g (2 d f-c g)+b^2 \left (6 d^2 f^2-8 c d f g+3 c^2 g^2\right )\right ) (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 d^3}-\frac {B (b c-a d) g^2 (4 b d f-3 b c g-a d g) (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^4}-\frac {B (b c-a d) g^3 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d^4}-\frac {(b f-a g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}-\frac {B (b c-a d) (2 b d f-b c g-a d g) \left (2 a b d^2 f g-a^2 d^2 g^2-b^2 \left (2 d^2 f^2-2 c d f g+c^2 g^2\right )\right ) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log \left (\frac {b c-a d}{b (c+d x)}\right )}{b^4 d^4}+\frac {2 B^2 (b c-a d)^4 g^3 \log \left (\frac {a+b x}{c+d x}\right )}{3 b^4 d^4}+\frac {B^2 (b c-a d)^3 g^2 (4 b d f-3 b c g-a d g) \log \left (\frac {a+b x}{c+d x}\right )}{b^4 d^4}+\frac {2 B^2 (b c-a d)^4 g^3 \log (c+d x)}{3 b^4 d^4}+\frac {B^2 (b c-a d)^3 g^2 (4 b d f-3 b c g-a d g) \log (c+d x)}{b^4 d^4}+\frac {2 B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-2 a b d g (2 d f-c g)+b^2 \left (6 d^2 f^2-8 c d f g+3 c^2 g^2\right )\right ) \log (c+d x)}{b^4 d^4}-\frac {2 B^2 (b c-a d) (2 b d f-b c g-a d g) \left (2 a b d^2 f g-a^2 d^2 g^2-b^2 \left (2 d^2 f^2-2 c d f g+c^2 g^2\right )\right ) \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{b^4 d^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 1.10, antiderivative size = 869, normalized size of antiderivative = 1.00, number of steps
used = 15, number of rules used = 10, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.323, Rules used = {2554, 2398,
2404, 2338, 2356, 46, 2351, 31, 2354, 2438} \begin {gather*} \frac {2 B^2 g^3 \log \left (\frac {a+b x}{c+d x}\right ) (b c-a d)^4}{3 b^4 d^4}+\frac {2 B^2 g^3 \log (c+d x) (b c-a d)^4}{3 b^4 d^4}+\frac {2 B^2 g^3 x (b c-a d)^3}{3 b^3 d^3}+\frac {B^2 g^2 (4 b d f-3 b c g-a d g) \log \left (\frac {a+b x}{c+d x}\right ) (b c-a d)^3}{b^4 d^4}+\frac {B^2 g^2 (4 b d f-3 b c g-a d g) \log (c+d x) (b c-a d)^3}{b^4 d^4}+\frac {B^2 g^3 (c+d x)^2 (b c-a d)^2}{3 b^2 d^4}+\frac {B^2 g^2 (4 b d f-3 b c g-a d g) x (b c-a d)^2}{b^3 d^3}+\frac {2 B^2 g \left (\left (6 d^2 f^2-8 c d g f+3 c^2 g^2\right ) b^2-2 a d g (2 d f-c g) b+a^2 d^2 g^2\right ) \log (c+d x) (b c-a d)^2}{b^4 d^4}-\frac {B g^3 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) (b c-a d)}{3 b d^4}-\frac {B g^2 (4 b d f-3 b c g-a d g) (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) (b c-a d)}{2 b^2 d^4}-\frac {B g \left (\left (6 d^2 f^2-8 c d g f+3 c^2 g^2\right ) b^2-2 a d g (2 d f-c g) b+a^2 d^2 g^2\right ) (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) (b c-a d)}{b^4 d^3}-\frac {B (2 b d f-b c g-a d g) \left (-\left (\left (2 d^2 f^2-2 c d g f+c^2 g^2\right ) b^2\right )+2 a d^2 f g b-a^2 d^2 g^2\right ) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log \left (\frac {b c-a d}{b (c+d x)}\right ) (b c-a d)}{b^4 d^4}-\frac {2 B^2 (2 b d f-b c g-a d g) \left (-\left (\left (2 d^2 f^2-2 c d g f+c^2 g^2\right ) b^2\right )+2 a d^2 f g b-a^2 d^2 g^2\right ) \text {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right ) (b c-a d)}{b^4 d^4}-\frac {(b f-a g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 46
Rule 2338
Rule 2351
Rule 2354
Rule 2356
Rule 2398
Rule 2404
Rule 2438
Rule 2554
Rubi steps
\begin {align*} \int (f+g x)^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2 \, dx &=\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}-\frac {B \int \frac {2 (b c-a d) (f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{(a+b x) (c+d x)} \, dx}{2 g}\\ &=\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}-\frac {(B (b c-a d)) \int \frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{(a+b x) (c+d x)} \, dx}{g}\\ &=\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}-\frac {(B (b c-a d)) \int \left (\frac {g^2 \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^3 d^3}+\frac {g^3 (4 b d f-b c g-a d g) x \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^2 d^2}+\frac {g^4 x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b d}+\frac {(b f-a g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^3 (b c-a d) (a+b x)}+\frac {(d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{d^3 (-b c+a d) (c+d x)}\right ) \, dx}{g}\\ &=\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}-\frac {\left (B (b c-a d) g^3\right ) \int x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \, dx}{b d}-\frac {\left (B (b f-a g)^4\right ) \int \frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{a+b x} \, dx}{b^3 g}+\frac {\left (B (d f-c g)^4\right ) \int \frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{c+d x} \, dx}{d^3 g}-\frac {\left (B (b c-a d) g^2 (4 b d f-b c g-a d g)\right ) \int x \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \, dx}{b^2 d^2}-\frac {\left (B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right )\right ) \int \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \, dx}{b^3 d^3}\\ &=-\frac {A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x}{b^3 d^3}-\frac {B (b c-a d) g^2 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^2}-\frac {B (b c-a d) g^3 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d}-\frac {B (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}+\frac {B (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)}{d^4 g}+\frac {\left (B^2 (b c-a d) g^3\right ) \int \frac {2 (b c-a d) x^3}{(a+b x) (c+d x)} \, dx}{3 b d}+\frac {\left (B^2 (b f-a g)^4\right ) \int \frac {(c+d x)^2 \left (-\frac {2 d e (a+b x)^2}{(c+d x)^3}+\frac {2 b e (a+b x)}{(c+d x)^2}\right ) \log (a+b x)}{e (a+b x)^2} \, dx}{b^4 g}-\frac {\left (B^2 (d f-c g)^4\right ) \int \frac {(c+d x)^2 \left (-\frac {2 d e (a+b x)^2}{(c+d x)^3}+\frac {2 b e (a+b x)}{(c+d x)^2}\right ) \log (c+d x)}{e (a+b x)^2} \, dx}{d^4 g}+\frac {\left (B^2 (b c-a d) g^2 (4 b d f-b c g-a d g)\right ) \int \frac {2 (b c-a d) x^2}{(a+b x) (c+d x)} \, dx}{2 b^2 d^2}-\frac {\left (B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right )\right ) \int \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right ) \, dx}{b^3 d^3}\\ &=-\frac {A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x}{b^3 d^3}-\frac {B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) (a+b x) \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{b^4 d^3}-\frac {B (b c-a d) g^2 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^2}-\frac {B (b c-a d) g^3 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d}-\frac {B (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}+\frac {B (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)}{d^4 g}+\frac {\left (2 B^2 (b c-a d)^2 g^3\right ) \int \frac {x^3}{(a+b x) (c+d x)} \, dx}{3 b d}+\frac {\left (B^2 (b f-a g)^4\right ) \int \frac {(c+d x)^2 \left (-\frac {2 d e (a+b x)^2}{(c+d x)^3}+\frac {2 b e (a+b x)}{(c+d x)^2}\right ) \log (a+b x)}{(a+b x)^2} \, dx}{b^4 e g}-\frac {\left (B^2 (d f-c g)^4\right ) \int \frac {(c+d x)^2 \left (-\frac {2 d e (a+b x)^2}{(c+d x)^3}+\frac {2 b e (a+b x)}{(c+d x)^2}\right ) \log (c+d x)}{(a+b x)^2} \, dx}{d^4 e g}+\frac {\left (B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g)\right ) \int \frac {x^2}{(a+b x) (c+d x)} \, dx}{b^2 d^2}+\frac {\left (2 B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right )\right ) \int \frac {1}{c+d x} \, dx}{b^4 d^3}\\ &=-\frac {A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x}{b^3 d^3}-\frac {B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) (a+b x) \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{b^4 d^3}-\frac {B (b c-a d) g^2 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^2}-\frac {B (b c-a d) g^3 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d}-\frac {B (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}+\frac {2 B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \log (c+d x)}{b^4 d^4}+\frac {B (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)}{d^4 g}+\frac {\left (2 B^2 (b c-a d)^2 g^3\right ) \int \left (\frac {-b c-a d}{b^2 d^2}+\frac {x}{b d}-\frac {a^3}{b^2 (b c-a d) (a+b x)}-\frac {c^3}{d^2 (-b c+a d) (c+d x)}\right ) \, dx}{3 b d}+\frac {\left (B^2 (b f-a g)^4\right ) \int \left (\frac {2 b e \log (a+b x)}{a+b x}-\frac {2 d e \log (a+b x)}{c+d x}\right ) \, dx}{b^4 e g}-\frac {\left (B^2 (d f-c g)^4\right ) \int \left (\frac {2 b e \log (c+d x)}{a+b x}-\frac {2 d e \log (c+d x)}{c+d x}\right ) \, dx}{d^4 e g}+\frac {\left (B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g)\right ) \int \left (\frac {1}{b d}+\frac {a^2}{b (b c-a d) (a+b x)}+\frac {c^2}{d (-b c+a d) (c+d x)}\right ) \, dx}{b^2 d^2}\\ &=-\frac {2 B^2 (b c-a d)^2 (b c+a d) g^3 x}{3 b^3 d^3}+\frac {B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g) x}{b^3 d^3}-\frac {A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x}{b^3 d^3}+\frac {B^2 (b c-a d)^2 g^3 x^2}{3 b^2 d^2}-\frac {2 a^3 B^2 (b c-a d) g^3 \log (a+b x)}{3 b^4 d}+\frac {a^2 B^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (a+b x)}{b^4 d^2}-\frac {B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) (a+b x) \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{b^4 d^3}-\frac {B (b c-a d) g^2 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^2}-\frac {B (b c-a d) g^3 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d}-\frac {B (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}+\frac {2 B^2 c^3 (b c-a d) g^3 \log (c+d x)}{3 b d^4}-\frac {B^2 c^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (c+d x)}{b^2 d^4}+\frac {2 B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \log (c+d x)}{b^4 d^4}+\frac {B (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)}{d^4 g}+\frac {\left (2 B^2 (b f-a g)^4\right ) \int \frac {\log (a+b x)}{a+b x} \, dx}{b^3 g}-\frac {\left (2 B^2 d (b f-a g)^4\right ) \int \frac {\log (a+b x)}{c+d x} \, dx}{b^4 g}-\frac {\left (2 b B^2 (d f-c g)^4\right ) \int \frac {\log (c+d x)}{a+b x} \, dx}{d^4 g}+\frac {\left (2 B^2 (d f-c g)^4\right ) \int \frac {\log (c+d x)}{c+d x} \, dx}{d^3 g}\\ &=-\frac {2 B^2 (b c-a d)^2 (b c+a d) g^3 x}{3 b^3 d^3}+\frac {B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g) x}{b^3 d^3}-\frac {A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x}{b^3 d^3}+\frac {B^2 (b c-a d)^2 g^3 x^2}{3 b^2 d^2}-\frac {2 a^3 B^2 (b c-a d) g^3 \log (a+b x)}{3 b^4 d}+\frac {a^2 B^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (a+b x)}{b^4 d^2}-\frac {B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) (a+b x) \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{b^4 d^3}-\frac {B (b c-a d) g^2 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^2}-\frac {B (b c-a d) g^3 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d}-\frac {B (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}+\frac {2 B^2 c^3 (b c-a d) g^3 \log (c+d x)}{3 b d^4}-\frac {B^2 c^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (c+d x)}{b^2 d^4}+\frac {2 B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \log (c+d x)}{b^4 d^4}-\frac {2 B^2 (d f-c g)^4 \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{d^4 g}+\frac {B (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)}{d^4 g}-\frac {2 B^2 (b f-a g)^4 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b^4 g}+\frac {\left (2 B^2 (b f-a g)^4\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,a+b x\right )}{b^4 g}+\frac {\left (2 B^2 (b f-a g)^4\right ) \int \frac {\log \left (\frac {b (c+d x)}{b c-a d}\right )}{a+b x} \, dx}{b^3 g}+\frac {\left (2 B^2 (d f-c g)^4\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,c+d x\right )}{d^4 g}+\frac {\left (2 B^2 (d f-c g)^4\right ) \int \frac {\log \left (\frac {d (a+b x)}{-b c+a d}\right )}{c+d x} \, dx}{d^3 g}\\ &=-\frac {2 B^2 (b c-a d)^2 (b c+a d) g^3 x}{3 b^3 d^3}+\frac {B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g) x}{b^3 d^3}-\frac {A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x}{b^3 d^3}+\frac {B^2 (b c-a d)^2 g^3 x^2}{3 b^2 d^2}-\frac {2 a^3 B^2 (b c-a d) g^3 \log (a+b x)}{3 b^4 d}+\frac {a^2 B^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (a+b x)}{b^4 d^2}+\frac {B^2 (b f-a g)^4 \log ^2(a+b x)}{b^4 g}-\frac {B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) (a+b x) \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{b^4 d^3}-\frac {B (b c-a d) g^2 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^2}-\frac {B (b c-a d) g^3 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d}-\frac {B (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}+\frac {2 B^2 c^3 (b c-a d) g^3 \log (c+d x)}{3 b d^4}-\frac {B^2 c^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (c+d x)}{b^2 d^4}+\frac {2 B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \log (c+d x)}{b^4 d^4}-\frac {2 B^2 (d f-c g)^4 \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{d^4 g}+\frac {B (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)}{d^4 g}+\frac {B^2 (d f-c g)^4 \log ^2(c+d x)}{d^4 g}-\frac {2 B^2 (b f-a g)^4 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b^4 g}+\frac {\left (2 B^2 (b f-a g)^4\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {d x}{b c-a d}\right )}{x} \, dx,x,a+b x\right )}{b^4 g}+\frac {\left (2 B^2 (d f-c g)^4\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{-b c+a d}\right )}{x} \, dx,x,c+d x\right )}{d^4 g}\\ &=-\frac {2 B^2 (b c-a d)^2 (b c+a d) g^3 x}{3 b^3 d^3}+\frac {B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g) x}{b^3 d^3}-\frac {A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x}{b^3 d^3}+\frac {B^2 (b c-a d)^2 g^3 x^2}{3 b^2 d^2}-\frac {2 a^3 B^2 (b c-a d) g^3 \log (a+b x)}{3 b^4 d}+\frac {a^2 B^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (a+b x)}{b^4 d^2}+\frac {B^2 (b f-a g)^4 \log ^2(a+b x)}{b^4 g}-\frac {B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) (a+b x) \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{b^4 d^3}-\frac {B (b c-a d) g^2 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^2}-\frac {B (b c-a d) g^3 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d}-\frac {B (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}+\frac {2 B^2 c^3 (b c-a d) g^3 \log (c+d x)}{3 b d^4}-\frac {B^2 c^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (c+d x)}{b^2 d^4}+\frac {2 B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \log (c+d x)}{b^4 d^4}-\frac {2 B^2 (d f-c g)^4 \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{d^4 g}+\frac {B (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)}{d^4 g}+\frac {B^2 (d f-c g)^4 \log ^2(c+d x)}{d^4 g}-\frac {2 B^2 (b f-a g)^4 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b^4 g}-\frac {2 B^2 (b f-a g)^4 \text {Li}_2\left (-\frac {d (a+b x)}{b c-a d}\right )}{b^4 g}-\frac {2 B^2 (d f-c g)^4 \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )}{d^4 g}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.63, size = 746, normalized size = 0.86 \begin {gather*} \frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2-\frac {2 B \left (6 A b d (b c-a d) g^2 \left (a^2 d^2 g^2+a b d g (-4 d f+c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x+6 B d (b c-a d) g^2 \left (a^2 d^2 g^2+a b d g (-4 d f+c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) (a+b x) \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+3 b^2 d^2 (b c-a d) g^3 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )+2 b^3 d^3 (b c-a d) g^4 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )+6 d^4 (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )-12 B (b c-a d)^2 g^2 \left (a^2 d^2 g^2+a b d g (-4 d f+c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \log (c+d x)-6 b^4 (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)+2 B (b c-a d) g^4 \left (b d (b c-a d) x (2 b c+2 a d-b d x)+2 a^3 d^3 \log (a+b x)-2 b^3 c^3 \log (c+d x)\right )-6 B (b c-a d) g^3 (-4 b d f+b c g+a d g) \left (-a^2 d^2 \log (a+b x)+b \left (d (-b c+a d) x+b c^2 \log (c+d x)\right )\right )-6 B d^4 (b f-a g)^4 \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \text {Li}_2\left (\frac {d (a+b x)}{-b c+a d}\right )\right )+6 b^4 B (d f-c g)^4 \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )\right )\right )}{3 b^4 d^4}}{4 g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.22, size = 0, normalized size = 0.00 \[\int \left (g x +f \right )^{3} \left (A +B \ln \left (\frac {e \left (b x +a \right )^{2}}{\left (d x +c \right )^{2}}\right )\right )^{2}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 2188 vs.
\(2 (858) = 1716\).
time = 0.42, size = 2188, normalized size = 2.52 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (f+g\,x\right )}^3\,{\left (A+B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^2}{{\left (c+d\,x\right )}^2}\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________